﻿using System;
using System.IO;

class LineNumbers
{
    static void Main()
    {
        StreamWriter writeFile = new StreamWriter("withLineNumbers.txt");
        using (writeFile)
        {
            using (StreamReader readFile = new StreamReader("withoutLineNumbers.txt"))
            {
                int line = 0;
                string readedLine = readFile.ReadLine();
                while (readedLine != null)
                {
                    line++;
                    writeFile.WriteLine("Line {0}: {1}", line, readedLine);
                    readedLine = readFile.ReadLine();
                }

            }
        }
        StreamReader readNewFile = new StreamReader("withLineNumbers.txt");
        using (readNewFile)
        {
            int line = 0;
            string readed = readNewFile.ReadLine();
            while (readed != null)
            {
                line++;
                Console.WriteLine(readed);
                readed = readNewFile.ReadLine();
            }
        }

    }
}

